WebTalk Animation Commands

Palette commands:

    show animate
    hide animate
    toggle animate

Synonyms:

    animate show palette
    animate hide palette
    animate toggle palette


Playback:

    animate play
    animate stop
    animate pause

    animate next frame
    animate previous frame
    animate first frame
    animate last frame
    animate go to frame <number>

Example:
    animate go to frame 10


Timeline commands:

    animate set fps to <number>
    animate set frames to <number>
    animate set total frames to <number>

Examples:
    animate set fps to 24
    animate set frames to 60


Keyframe commands via scripting:

Add a keyframe at the current frame for all properties of selected object:
    animate add keyframes

Add a keyframe at a specific frame for a specific property:
    animate add keyframe <frame> of <property> of <object>

Update an existing keyframe value:
    animate update keyframe <frame> of <property> of <object> to <value>

Delete a keyframe:
    animate delete keyframe <frame> of <property> of <object>

Properties for animation:
    - loc        (position as "x,y")
    - width      (object width in pixels)
    - height     (object height in pixels)
    - rotation   (rotation in degrees)
    - fill       (fill color for graphics)
    - points     (shape points for graphics)

Examples:
    animate add keyframe 10 of loc of myButton
    animate update keyframe 5 of width of myField to 200
    animate delete keyframe 15 of rotation of myGraphic


Property anim commands:

    animate <property> of <object> to <value> at frame <number>

Examples:
    animate loc of myButton to "100,200" at frame 10
    animate width of myField to 300 at frame 5
    animate rotation of myGraphic to 45 at frame 20
    animate fill of myShape to "red" at frame 15


Tween commands:

Enable tweening between two frames:
    animate enable tween from <frame1> to <frame2> of <property> of <object>

Disable tweening between two frames:
    animate disable tween from <frame1> to <frame2> of <property> of <object>

Toggle tween at a specific keyframe:
    animate toggle tween at <frame> of <property> of <object>

Examples:
    animate enable tween from 5 to 15 of loc of myButton
    animate disable tween from 10 to 20 of rotation of myGraphic
    animate toggle tween at 8 of width of myField


Easing commands:

    animate set easing of <property> of <object> to <easingType>

Available easing types:
    - linear          (constant speed)
    - easeIn          (accelerate at start)
    - easeOut         (decelerate at end)
    - easeInOut       (accelerate then decelerate)
    - bounce          (bounce effect at end)
    - overshoot       (overshoot then snap back)
    - elastic         (elastic wobble effect)

Examples:
    animate set easing of loc of myButton to bounce
    animate set easing of rotation of myGraphic to elastic
    animate set easing of width of myField to easeInOut


Path based movement (experimental):

Move in a circular path:
    animate move <object> circular around <centerX>,<centerY> radius <radius> from <startAngle> to <endAngle> in <duration>

Move in an elliptical path:
    animate move <object> elliptical around <centerX>,<centerY> radiusX <rx> radiusY <ry> from <startAngle> to <endAngle> in <duration>

Move along a polygonal path (through waypoints):
    animate move <object> polygonal through <point1>,<point2>,<point3>... in <duration>

Move along a linear path:
    animate move <object> to <x>,<y> in <duration>

All path commands support optional easing at the end:
    ... in <duration> easing <easingType>

Examples:
    animate move myButton circular around 200,200 radius 100 from 0 to 360 in 60
    animate move myGraphic elliptical around 300,300 radiusX 150 radiusY 80 from 0 to 180 in 30
    animate move myObject polygonal through 100,100,200,200,300,100 in 45
    animate move myButton to 400,300 in 20 easing bounce


Batch commands:
(Lock and unlock animations for animation changes at the same time).

    animate lock
    animate unlock

When locked, keyframe additions are batched and applied together when unlocked.

Example:
    animate lock
    animate loc of myButton to "100,200" at frame 10
    animate width of myButton to 150 at frame 10
    animate height of myButton to 50 at frame 10
    animate unlock


Other commands:
Export animation data to a variable as a HyperTalk script:
    animate export to <variable>

Example:
    animate export to tScript
    put tScript
